/*
图片管理模块
*/
import request from '@/utils/request.js'

export const loadImageInfo = (params) => {
  return request({
    method: 'get',
    url: '/user/images',
    params: params
  })
}

// 收藏模块
export const toggleCollect = (params) => {
  return request({
    method: 'put',
    url: '/user/images/' + params.id,
    data: {
      collect: params.collect
    }
  })
}

// 删除图片模块
export const deleteImage = (id) => {
  return request({
    method: 'delete',
    url: '/user/images/' + id
  })
}
